<style lang="scss" scoped>
  $mainColor: #179AFE;
  $borderColor: #e9e9e9;

  .income-detail{
    padding: .2rem;
    background-color: #fff;
    .hd{
      font-size: .28rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: .2rem;
      margin-bottom: .2rem;
      border-bottom: 1px solid $borderColor;
      .num{
        color: $mainColor;
        font-size: .36rem;
      }
    }
    .dt{
      font-size: .28rem;
      .item{
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: .2rem 0;
        .lb{
          width: 1.5rem;
          flex-shrink: 0;
          color: #666;
        }
        .rb{
          color: #333;
        }
      }
    }
  }
</style>

<template>
  <div class="container hasNav">
    <van-nav-bar title="明细详情" left-arrow left-text="返回" @click-left="$router.back()" fixed />

    <!-- 收入详情 -->
    <div class="income-detail" v-if="type === 1">
      <div class="hd">
        金额
        <span class="num">{{form.payMoney}}</span>
      </div>
      <div class="dt">
        <div class="item">
          <div class="lb">类型</div>
          <div class="rb">{{form.costType}}</div>
        </div>
        <div class="item">
          <div class="lb">状态</div>
          <div class="rb">{{form.drawingsStatus}}</div>
        </div>
        <div class="item">
          <div class="lb">订单号</div>
          <div class="rb">{{form.ordernum}}</div>
        </div>
        <div class="item">
          <div class="lb">入账时间</div>
          <div class="rb">{{form.payTime}}</div>
        </div>
        <div class="item">
          <div class="lb">服务时间</div>
          <div class="rb">{{form.serviceDate}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'IncomeDetail',
    data() {
      return {
        id: null,
        type: 1,
        form: {}
      };
    },
    mounted(){
      this.type = +this.$route.query.type;
      this.form = JSON.parse(this.$route.query.detail)
    },
    methods: {}
  };
</script>
